<?php

namespace App\Jobs;


use App\Services\ChargeService;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Log;

class SendSmsMessageJob implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    protected $order_id;
    /**
     * @var mixed|string
     */
    private $status;
    /**
     * @var mixed|string
     */
    private $lease_id;
    /**
     * @var mixed
     */
    private $sms_template_scene;
    /**
     * @var mixed
     */
    private $mobile;
    /**
     * @var mixed
     */
    private $content;

    public function __construct($sms_template_scene,$order_id,$lease_id='')
    {
        $this->sms_template_scene = $sms_template_scene;
        $this->order_id = $order_id;
        $this->lease_id = $lease_id;
    }

    /**
     * Execute the job.
     * @return void
     */
    public function handle()
    {
        Log::Info("sms开始");
        Log::Info($this->order_id);
        ChargeService::smsUseConfigTemplate($this->sms_template_scene,$this->order_id,$this->lease_id);
        Log::Info("sms结束");
    }
}
